// components/serviceList/serviceList.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    serve: [
      {
        "icon": "/img/logo/mark.png",
        "text": "成绩",
        "skip": '/pages/achievement/achievement'
      },
      {
        "icon": "/img/logo/timetable.png",
        "text": "课表",
        "skip": "/pages/timetable/timetable"
      },
      {
        "icon": "/img/logo/proclamation.png",
        "text": "公告",
        "skip": null
      },
      {
        "icon": "/img/logo/behaviour.png",
        "text": "行为",
        "skip": null
      },
      {
        "icon": "/img/logo/loss.png",
        "text": "失物",
        "skip": null
      },
      {
        "icon": "/img/logo/used.png",
        "text": "二手",
        "skip": null
      },
      {
        "icon": "/img/logo/interact.png",
        "text": "互动",
        "skip": null
      },
      {
        "icon": "/img/logo/activity.png",
        "text": "活动",
        "skip": null
      }
    ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    skip(ever) {
      if (ever.currentTarget.dataset.url) {
        wx.redirectTo({
          url: ever.currentTarget.dataset.url
        })
      }

    }
  }
})
